<%@ Page Language="C#" MasterPageFile="~/Admin/BoardAdmin.Master" AutoEventWireup="true" CodeBehind="ManageForums.aspx.cs" Inherits="UserInterface.Admin.ManageForums" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
    <h1><%= GetLocalResourceObject("Header") %></h1>
    <div class="options">
        <asp:Button ID="NewCategoryButton" Text="<%$ Resources:NewCategory %>" OnClick="NewCategoryButton_OnClick" runat="server"/>
    </div>
    <asp:Repeater ID="CategoryRepeater" OnItemDataBound="CategoryRepeater_ItemDataBound" OnItemCommand="CategoryRepeater_ItemCommand" runat="server">
        <HeaderTemplate>
            <table class="default-table">
                <tr>
                    <th>&nbsp;</th>
                    <th class="default-option-width">Options</th>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
                <tr>
                    <td class="default-category-header"><%# Eval("Name") %></td>
                    <td class="default-category-header">
                        <asp:ImageButton ImageUrl="~/Admin/Template/Images/Icons/edit.gif" ID="EditCategoryImageButton" CommandName="Edit" CommandArgument='<%# Eval("Id") %>' runat="server" />
                        <asp:ImageButton imageUrl="~/Admin/Template/Images/Icons/remove.gif" ID="RemoveCategoryImageButton" CommandName="Remove" CommandArgument='<%# Eval("Id") %>' runat="server" />
                        <asp:ImageButton ImageUrl="~/Admin/Template/Images/Icons/move-up.gif" ID="MoveCategoryUpImageButton" CommandName="Up" CommandArgument='<%# Eval("Id") %>' runat="server" />
                        <asp:ImageButton ImageUrl="~/Admin/Template/Images/Icons/move-down.gif" ID="MoveCategoryDownImageButton" CommandName="Down" CommandArgument='<%# Eval("Id") %>' runat="server" />
                        <asp:Button ID="NewForumButton" CommandName="NewForum" CommandArgument='<%# Eval("Id") %>' Text="<%$ Resources:NewForum %>" runat="server" />
                    </td>
                </tr>
                <asp:Repeater runat="server" ID="ForumRepeater" OnItemDataBound="ForumRepeater_ItemDataBound" OnItemCommand="ForumRepeater_ItemCommand" DataSource='<%# Eval("Forums") %>'>
                    <ItemTemplate>
                        <tr class="default-data-row">
                               <td class="default-data-column"><a href="EditForumPermissions.aspx?forumId=<%# Eval("Id") %>"><%# Eval("Name") %></a></td>
                               <td class="default-data-column">
                                    <asp:ImageButton ImageUrl="~/Admin/Template/Images/Icons/edit.gif" ID="EditForumImageButton" CommandName="Edit" CommandArgument='<%# Eval("Id") %>' runat="server" />
                                    <asp:ImageButton imageUrl="~/Admin/Template/Images/Icons/remove.gif" ID="RemoveForumImageButton" CommandName="Remove" CommandArgument='<%# Eval("Id") %>' Text="<%$ Resources:Remove %>" runat="server" />
                                    <asp:ImageButton ImageUrl="~/Admin/Template/Images/Icons/move-up.gif" ID="MoveForumUpImageButton" CommandName="Up" CommandArgument='<%# Eval("Id") %>' runat="server" />
                                    <asp:ImageButton ImageUrl="~/Admin/Template/Images/Icons/move-down.gif" ID="MoveForumDownImageButton" CommandName="Down" CommandArgument='<%# Eval("Id") %>' runat="server" />
                               </td>
                        </tr>
                    </ItemTemplate>
                    <AlternatingItemTemplate>
                         <tr class="alternate-data-row">
                               <td class="alternate-data-column"><a href="EditForumPermissions.aspx?forumId=<%# Eval("Id") %>"><%# Eval("Name") %></a></td>
                               <td class="alternate-data-column">
                                    <asp:ImageButton ImageUrl="~/Admin/Template/Images/Icons/edit.gif" ID="EditForumImageButton" CommandName="Edit" CommandArgument='<%# Eval("Id") %>' runat="server" />
                                    <asp:ImageButton ImageUrl="~/Admin/Template/Images/Icons/remove.gif" ID="RemoveForumImageButton" CommandName="Remove" CommandArgument='<%# Eval("Id") %>' Text="<%$ Resources:Remove %>" runat="server" />
                                    <asp:ImageButton ImageUrl="~/Admin/Template/Images/Icons/move-up.gif" ID="MoveUpImageButton" CommandName="Up" CommandArgument='<%# Eval("Id") %>' runat="server" />
                                    <asp:ImageButton ImageUrl="~/Admin/Template/Images/Icons/move-down.gif" ID="MoveDownImageBottom" CommandName="Down" CommandArgument='<%# Eval("Id") %>' runat="server" />
                               </td>
                        </tr>
                    </AlternatingItemTemplate>
                </asp:Repeater>
        </ItemTemplate>
        <FooterTemplate>
            </table>
        </FooterTemplate>
    </asp:Repeater>
</asp:Content>
